/**
 * Created by YY on 7/22/2016.
 */
angular.module('teacher.qa', [
  'ui.router',
  'oc.lazyLoad',
  'teacher.qa.addQa',
  'teacher.qa.qaList',
  'teacher.qa.qaReport',
  'teacher.qa.qaPost',
  'teacher.qa.qaAddDetail'
])
  .config(function ($ocLazyLoadProvider) {
    $ocLazyLoadProvider.config({
      modules: [{
        debug: true,
        name: 'teacher.qa.addQa',
        files: ['app/teacher/qa/addQa/addQa.js']
      }]
    })
  })
  .config(function ($stateProvider) {
    $stateProvider.state('teacher.qa', {
      url: '/qa',
      views: {
        'header': {
          templateUrl: 'app/layout/header/header.html',
          controller :'teacherHeaderCtrl'
        },
        'main': {
          templateUrl: 'app/teacher/qa/qa.html',
          controller: 'teacher.qa.ctrl'
        }
      },
      resolve: {
        // lazy: function ($ocLazyLoad) {
        //   return $ocLazyLoad.load([
        //     'teacher.qa.addQa'
        //   ]);
        // }
      }
    })
  })
  .controller('teacher.qa.ctrl', function ($scope) {
    $scope.QAitems = ['作业1', '作业2', '作业3', '作业4'];
  });